#include<iostream>
using namespace std;



class Cube
{
  //接口函数
  //公共
  public:
    //输入长
    void setL(int x)
    {
      C_L = x;
    }
    //获取长
    int getL()
    {
      return C_L;
    }

    //输入宽
    void setW(int x)
    {
      C_W = x;
    }
    //获取宽
    int getW()
    {
      return C_W;
    }

    //输入高
    void setH(int x)
    {
      C_H = x;
    }
    //获取高
    int getH()
    {
      return C_H;
    }

    int InPerimetter()
    {
      return  (C_H * C_W + C_H * C_L + C_W * C_L )*2;

    }
    int InArea()
    {
      return C_H * C_W * C_L;
    }



  //私有
  private:
    //长
    int C_L;
    //宽
    int C_W;
    //高
    int C_H;
};
int OutPerimetter(Cube &c)
{

  return (c.getH() * c.getW() + c.getH() * c.getL() + c.getW() * c.getL()) * 2; 
}

int OutArea(Cube &c)
{
  return c.getL() * c.getH() * c.getW();

}

int main()
{

  Cube c1;
  c1.setH(10);
  c1.setL(10);
  c1.setW(10);
 cout << "周长为：" << OutPerimetter(c1) << endl;
 cout << "类函数求出的周长为：" << c1.InPerimetter() << endl;

 cout << "面积为:" << OutArea(c1) << endl;
 cout << "类函数求出的面积:" << c1.InArea() << endl;
  return 0;
}
